package com.twu.biblioteca;

import java.util.ArrayList;
import java.util.List;

public class Books {

    private ArrayList<Book> books = new ArrayList<Book>();
    private String book = "";

    public Books() {
        Initialize();
    }

    private void Initialize() {
        books.add(new Book("1. UML", false));
        books.add(new Book("2. Design Principles", false));
        books.add(new Book("3. Biology for kids", false));
    }

    public List<Book> getBooks()
    {
        return books;
    }

    @Override
    public String toString() {
        int count = 1;
        StringBuilder nameOfBooks =  new StringBuilder();
        for(Book book : books){
            nameOfBooks.append(count++ + ". ");
            nameOfBooks.append(book);
            nameOfBooks.append("\n");
        }

        return nameOfBooks.toString();
    }
}
